$modal-prefix-cls: "#{$css-prefix}modal";
$confirm-prefix-cls: "#{$css-prefix}modal-confirm";

.#{$modal-prefix-cls} {
  width: auto;
  margin: 0 auto;
  position: relative;
  outline: none;
  top:$msgbox-top;

  &-hidden {
      display: none !important;
  }

  &-wrap {
      position: fixed;
      // position:absolute;
      overflow: auto;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      // z-index: $zindex-modal;
      -webkit-overflow-scrolling: touch;
      outline: 0;
      user-select: none;
  }

  &-wrap * {
      box-sizing: border-box;
      -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  }

  &-mask {
    @include mask;
  }

  &-content {
      position: relative;
      background-color:$msgbox-content-background-color;
      border: 0;
      border-radius: $border-radius-base;
      background-clip: padding-box;
  }

  &-header {
    cursor:pointer;
    @include content-header;
  }

  &-close {
    @include content-close(1px, 31px);
  }
  &-maximize {
    @include content-maximise(-1px, 16px);
  }

  &-body {
    padding: $msgbox-body-padding;
    font-size: $msgbox-body-font-size;
    line-height: 1.5;
    & p {
      color: $msgbox-body-color;
      font-size: $font-size-small; 
    }
  }

  &-footer {
    border-top: 1px solid $border-color-split;
    padding: $msgbox-footer-padding;
    text-align: right;
    button + button {
        margin-left: 8px;
        margin-bottom: 0;
    }
  }
}

@media (max-width: 768px) {
  .#{$modal-prefix-cls} {
      width: auto !important;
      margin: 10px;
  }
  .vertical-center-modal {
      .#{$modal-prefix-cls} {
          flex: 1;
      }
  }
}

.#{$confirm-prefix-cls} {
  padding:$msgbox-confirm-padding;
  &-head {

    &-icon {
      position: absolute;
      top: $msgbox-confirm-head-icon-top;
      left: $msgbox-confirm-head-icon-left;
      & i {
        font-size:$msgbox-confirm-head-icon-font-size;
      }

      &-info {
          color: $primary-color;
      }
      &-success {
          color: $success-color;
      }
      &-warning {
          color: $warning-color;
      }
      &-error {
          color: $error-color;
      }
      &-confirm {
          color: $warning-color;
      }
    }

    &-title {
      display: inline-block;
      font-size: $font-size-base;
      color: $msgbox-title-color;
      font-weight: $msgbox-title-font-weight;
      margin-left: $msgbox-title-margin-left;
    }
  }

  &-body{
    font-family: MicrosoftYaHei;
    font-size: $font-size-small;
    color: $msgbox-body-color;
    text-align: left;
    line-height: $msgbox-body-line-height;
    padding-left: $msgbox-body-padding-left;
    padding-top:$msgbox-body-padding-top;
    position: relative;

    &-render{
      margin: $msgbox-body-render-margin;
      padding: 0;
    }

    &-icon {
      position: absolute;
      top: 0;
      left: 0;
      & i {
        font-size: $msgbox-body-icon-font-size;
      }

      &-info {
          color: $primary-color;
      }
      &-success {
          color: $success-color;
      }
      &-warning {
          color: $warning-color;
      }
      &-error {
          color: $error-color;
      }
      &-confirm {
          color: $warning-color;
      }
    }
    & p {
      font-size: $msgbox-body-font-size;
    }
  }

  &-footer{
    margin-top: $msgbox-footer-margin-top;
    text-align: right;

    button + button {
      margin-left: 8px;
      margin-bottom: 0;
    }
  }
}